package com.petecat.interchan.base.param.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.petecat.interchan.base.param.entity.BsProperties;
import com.petecat.interchan.core.mapper.BaseMapper;
import com.petecat.interchan.protocol.base.param.vo.BsPropertiesQryVO;

@Mapper
@Repository
public interface IParamMapper extends BaseMapper<BsProperties, String>{
	
	/**
	 * 修改参数配置状态
	 * @param paramId
	 * @param state
	 */
	void updateCompanyStateById(@Param("paramId") String paramId,@Param("state") String state);
	
	/**
	 * 停用所有项目配置
	 * @param projectId
	 */
	void updateStateByProjectId(@Param("projectId") String projectId);
	
	/**
	 *  通过项目ID和用户ID查询正在启用的配置信息
	 * @param projectId
	 * @param userId
	 * @return
	 */
	BsPropertiesQryVO getParamByProjectIdAndUserId(@Param("projectId") String projectId,@Param("userId") String userId);

}
